package com.jboltai.event.handler;

import com.jboltai.event.EventError;
import com.jboltai.event.EventState;

public interface EventHandler<EventType, ResultType> {


    void onSuccess(EventType event, ResultType msg);

    void onFail(EventType event, EventError error);

    void onComplete(EventType event);

    default void onCancel(EventType event) {

    }

    default void onStateChange(EventType event, EventState state) {

    }

    default void onStart(EventType event) {

    }


}
